package com.example.feign.feign.fallback;

import com.example.feign.entity.Chapter;
import com.example.feign.feign.ChapterFeign;
import com.example.feign.util.Response;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
public class ChapterFallback implements ChapterFeign {

    @Override
    public Response getChapter(Integer page, Integer size, String spId, String courseName, Map map) {
        Response response = new Response();
        response.setMsg("服用调用失败");
        response.setStatus(500);
        response.setData(null);
        return response;
    }

    @Override
    public Response addChapter(Chapter chapter) {
        Response response = new Response();
        response.setMsg("服用调用失败");
        response.setStatus(500);
        response.setData(null);
        return response;
    }

    @Override
    public Response updateChapter(Chapter chapter) {
        Response response = new Response();
        response.setMsg("服用调用失败");
        response.setStatus(500);
        response.setData(null);
        return response;
    }

    @Override
    public Response delChapter(String chapterId) {
        Response response = new Response();
        response.setMsg("服用调用失败");
        response.setStatus(500);
        response.setData(null);
        return response;
    }
}
